<?php 
$total = count($posts);
if($posts && $total>0):
$i=0;
?>
<div id="bignews_bigevent">
  <div id="bignews">
    <div class="img">
      <a href="<?php echo @$posts[$i]->url;?>" title="<?php echo @$posts[$i]->post_title;?>"> 
        <img  width="520" height="312" src="<?php echo @$posts[$i]->image;?>" alt="<?php echo @$posts[$i]->alias;?>" /> 
      </a>
    </div>
    <div class="title"> 
      <a href="<?php echo @$posts[$i]->url;?>" title="<?php echo @$posts[$i]->post_title;?>">
        <?php echo @$posts[$i]->post_title;?>
      </a> 
    </div>
    <div class="desc"> 
      <?php echo @$posts[$i]->post_excerpt;?>
    </div>
    <div class="relative_news">
      <ul>
        <?php 
          $i++;
          for ($i; $i < $total && $i < 4 ; $i++) :?>
        <li>
            <a href="<?php echo @$posts[$i]->url;?>" title="<?php echo @$posts[$i]->post_title;?>">
              <?php echo @$posts[$i]->post_title;?>
            </a>
        </li>
        <?php endfor; ?>
      </ul>
    </div>
  </div>
</div>
<?php endif;?>

<?php 
  for ($i; $i < $total; $i++) :?>
<div class="box_sub_cate">
  <a href="<?php echo @$posts[$i]->url;?>" title="<?php echo @$posts[$i]->post_title;?>">
    <img src="<?php echo @$posts[$i]->image;?>" width="140" height="84" alt="<?php echo @$posts[$i]->alias;?>">
  </a>
  <a href="<?php echo @$posts[$i]->url;?>" title="<?php echo @$posts[$i]->post_title;?>" class="font_title">
    <?php echo $posts[$i]->post_title;?>
  </a>
  <div class="from_date">
    MỘT THẾ GIỚI | <?php echo date('d-m-Y',@$posts[$i]->pos_time_start);?> | 0 Bình Luận
  </div>
  <div class="desc_">
    <?php echo @$posts[$i]->post_excerpt;?>
  </div>
  <div class="cls"></div>
  <div class="tag">
   <strong> Từ khóa:</strong> <a href="#">du lịch</a>, <a href="#">thực học</a>, <a href="#">quản trị</a></div>
</div>
<?php endfor; ?>
<div class="cls"></div>

<div class="pagging">
  <ul>
    <?php
     echo @$this->pagination->create_links(); ?>
  </ul>
</div>

